/**
 * Demo.java is created by Zachariah at 2012-2-14 下午05:56:52
 */
package com.zack.designPattern.observer;

/**
 * @author zachariah zzcfrog@gmail.com
 *
 */
public class Demo {

	/**
	 *
	 * @author zachariah
	 * @param args
	 */
	public static void main(String[] args) {
		IObserver o1 = new Observer("o1");
		IObserver o2 = new Observer("o2");
		ISubject s = new Subject();
		
		s.addObserver(o1);
		s.addObserver(o2);
		s.notifyAllObservers();
		
		s.delObserver(o2);
		s.notifyAllObservers();
		
	}

}
